package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.EmpAdditionalFieldsExample.E_COMPANY_ID;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.E_CONTENT;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.E_EMP_ID;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.E_FIELD_ID;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.E_MODULE_CODE;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.E_TYPE;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.M_CONTENT_MAX;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.M_EMP_ID_MAX;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.M_FIELD_ID_NOT_NULL;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.M_MODULE_CODE_MAX;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.N_COMPANY_ID;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.N_CONTENT;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.N_EMP_ID;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.N_FIELD_ID;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.N_MODULE_CODE;
import static org.jsola.hr.example.EmpAdditionalFieldsExample.N_TYPE;

/**
 * 员工额外字段信息表
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【员工额外字段信息表】的参数")
@Data
public class EmpAdditionalFieldsAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_MODULE_CODE, example = E_MODULE_CODE)
    @Length(max = 30, message = M_MODULE_CODE_MAX)
    private String moduleCode;

    @ApiModelProperty(notes = N_FIELD_ID, example = E_FIELD_ID, required = true)
    @NotNull(message = M_FIELD_ID_NOT_NULL)
    private Long fieldId;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_EMP_ID, example = E_EMP_ID)
    @Length(max = 32, message = M_EMP_ID_MAX)
    private String empId;

    @ApiModelProperty(notes = N_CONTENT, example = E_CONTENT)
    @Length(max = 200000, message = M_CONTENT_MAX)
    private String content;

    @ApiModelProperty(notes = N_TYPE, example = E_TYPE)
    private Integer type;


}

